﻿namespace Numbrella.ProblemProvider
{
	using System.Configuration;
	
	internal class Settings : ApplicationSettingsBase
	{
		static Settings()
		{
			Current = new Settings();
		}

		private Settings()
		{
		}

		public static Settings Current { get; private set; }

		[UserScopedSetting]
		[DefaultSettingValue("10")]
		public double ErrorTimeout
		{
			get { return (double)this["ErrorTimeout"]; }
			set { this["ErrorTimeout"] = value; }
		}

		[UserScopedSetting]
		[DefaultSettingValue("10")]
		public double TrackerNotificationTimeout
		{
			get { return (double)this["TrackerNotificationTimeout"]; }
			set { this["TrackerNotificationTimeout"] = value; }
		}

		[UserScopedSetting]
		[DefaultSettingValue("net.tcp://localhost/Tracker.svc")]
		public string TrackerConnectionString
		{
			get { return (string)this["TrackerConnectionString"]; }
			set { this["TrackerConnectionString"] = value; }
		}

		[UserScopedSetting]
		[DefaultSettingValue("11772")]
		public int ProblemHostingPort
		{
			get { return (int)this["ProblemHostingPort"]; }
			set { this["ProblemHostingPort"] = value; }
		}

		[UserScopedSetting]
		[DefaultSettingValue("hr0nix")]
		public string UserName
		{
			get { return (string)this["UserName"]; }
			set { this["UserName"] = value; }
		}

		[UserScopedSetting]
		[DefaultSettingValue("31337")]
		public string Password
		{
			get { return (string)this["Password"]; }
			set { this["Password"] = value; }
		}
	}
}